import request from "../util/request";

// 登录和基础接口
export const login = function (params = {}) {
  return request({
    url: "/login",
    method: "post",
    params: params,
    isPublic: true,
  });
};

export const getMenu = function () {
  return request({
    url: "/menus",
    method: "get",
  });
};

// 用于下拉列表得初始数据加载

export const selectTeacherOptions = function (params = {}) {
  return request({
    url: "/auth/teacher",
    method: "get",
    params,
  });
};

export const selectDepartmentOptions = function (params = {}) {
  return request({
    url: "/auth/faculties",
    method: "get",
    params,
  });
};

export const selectMajorOptions = function (params = {}) {
  return request({
    url: "/auth/specialized",
    method: "get",
    params,
  });
};

export const selectClassOptions = function (params = {}) {
  return request({
    url: "/auth/class",
    method: "get",
    params,
  });
};
